click at 195, item 2 of the clickLoc with shiftKey
if the selection is empty
then
set lockText of the target to true
exit mouseUp
else
put the selection into holder
put card field holder into bkgnd field "Text"
put holder into bkgnd field "Title"
set lockText of the target to true
hide bkgnd field "List"
hide bkgnd field "Instructions"
hide button "Cancel"
hide button "Sort Document Names"
end if
end mouseUp
-- part 44 (button)
-- low flags: 00
-- high flags: 2001
-- rect: left=487 top=3 right=17 bottom=507
-- title width / last selected line: 0
-- icon id / first selected line: 21847 / 21847
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseUp
visual effect iris close
go Home
end mouseUp
-- part 64 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=123 top=21 right=40 bottom=387
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Title
-- part 47 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=335 top=3 right=19 bottom=484
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Date
----- HyperTalk script -----
on mouseUp
set the cursor to 4
set lockScreen to true
get item 2 to 3 of field "Date"
delete char 1 of it
put it into field "Temp Field"
show field "Temp Field"
type tab
type tab
doMenu "Copy Text"
hide field "Temp Field"
set the cursor to 1
click at 4,41
set lockscreen to false
end mouseUp
-- part 66 (button)
-- low flags: 00
-- high flags: 8000
-- rect: left=28 top=0 right=18 bottom=63
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: File
----- HyperTalk script -----
on mouseDown
get PopUpMenu("New;New & get address;Open...;Import Text File;Save;Save As...;Export as Text File;Delete HyperWrite Document;---------;Print...;----------;Quit HyperWrite;Quit HyperCard",0,20,29)
if it is 1
then
"Verify"
"New"
exit mouseDown
else
if it is 2
then
"Verify"
"New"
go "Address"
exit mouseDown
else
if it is 3
then
"Verify"
show field "List"
show field "Instructions"
show button "Cancel"
show button "Sort Document Names"
exit mouseDown
else
if it is 4
then
"Verify"
OpenText
exit mouseDown
else
if it is 5
then
"Save"
exit mouseDown
else
if it is 6
then
SaveAs
exit mouseDown
else
if it is 7
then
TextFile
exit mouseDown
else
if it is 8
then
hide field "List"
put field "List" into card field "DelFld"
show card field "Select"
show card field "DelFld"
exit mouseDown
else
if it is 9
then
exit mouseDown
else
if it is 10
then
go to card "Print Directions 1"
exit mouseDown
else
if it is 11
then
exit mouseDown
else
if it is 12
then
go Home
exit mouseDown
else
if it is 13
then
doMenu "Quit HyperCard"
exit mouseDown
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end mouseDown
on OpenText
Get FileName("TEXT")
if it is empty then exit OpenText
put it into fileName
open file fileName
read from file fileName for 99999
put it into field "Text"
close file fileName
hide field "List"
end OpenText
on New
hide field "List"
put empty into bkgnd field "Text"
put "<<untitled>>" into bkgnd field "Title"
click at 4,41
end New
on Save
if field "Text" is empty
then
answer "There is nothing to save!"
exit Save
else
if field "Title" = "<<untitled>>"
then
SaveAs
exit Save
else
set the cursor to 4
set the lockScreen to true
put field "Title" into filename
put bkgnd field "Text" into card field fileName
end if
end if
end Save
on Verify
if field "Text" is not empty and field "Title" = "<<untitled>>" then LetMeKnow
end Verify
on LetMeKnow
global failsafe
Beep
Beep
Answer "Current document is not saved!" with "I don't care!" or "Save it!"
if it is "Save it!" then SaveAs
if failsafe is 1 then verify
end LetMeKnow
on SaveAs
global failsafe
get field "Text"
if it is empty
then
answer "There is nothing to save!"
exit SaveAs
else
ask "Save text to what file name?"
if it is empty
then
answer "Proceed without saving?" with "No, go back" or "OK"
If it is "OK"
then
put 0 into failsafe
exit SaveAs
else
SaveAs
end if
else
put it into fileName
put number of lines in bkgnd field "List" into Count
repeat with L= 1 to Count
put the number of chars of line L of bkgnd field "List" into LChars
put the number of chars of fileName into FChars
repeat while line L of bkgnd field "List" = fileName and LChars = FChars
answer "Sorry, that name is taken. Try another." with "OK"
put 1 into failsafe
SaveAs
exit SaveAs
end repeat
end repeat
set the lockScreen to true
set the cursor to 4
put it into fileName
set the lockScreen to true
domenu "New Field"
get the number of card fields
set name of card field IT to filename
put bkgnd field "Text" into card field fileName
put number of lines in bkgnd field "List" into counter
add 1 to counter
put fileName into line counter of bkgnd field "List"
put fileName into bkgnd field "Title"
choose browse tool
hide card field fileName
put 0 into failsafe
end if
end if
end SaveAs
on TextFile
get field "Text"
put it into temp
if it is empty
then
answer "There is nothing to save!"
exit TextFile
else
put NewFileName("Save document as?","")into fileName
if fileName is empty then exit TextFile
open file fileName
write temp to file fileName
close file fileName
end if
end TextFile
-- part 68 (button)
-- low flags: 00
-- high flags: 8000
-- rect: left=157 top=0 right=18 bottom=193
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Font
----- HyperTalk script -----
on mouseDown
get PopUpMenu("Chicago;Geneva;Monaco;----------;Other...",0,20,157)